/* @(#)GSOrderDetailOfBusVO.java   
 *
 * Project: GS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Jenny Li    2006-3-18     鏂板
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import com.hitrust.gs.service.GSBaseBean;

/**
 * 
 */
public class GSOrderDetailOfBusForSWVO implements GSBaseBean {

    public String orderid;
    public String manufactureId;    //浜у搧缂栫爜
    public String manufactureName;  //浜у搧鍚嶇О
    public String manufSpec;
    public String manufType;
    public String manufBrand;
    public double orderCount;
    public String quantUnit;
    public String orderDetailStatus;
    public String orderCreateDate;  //鍒涘缓鏃堕棿
    public String orderDeptId;      //璁㈣揣鍗曚綅
    public String deliverMode; //閰嶉�鏂瑰紡
    public String banlanceMode; //缁撶畻鏂瑰紡
    public String deliverGoodsAddr; //閫佽揣鍦板潃

    public String conCentricityId; //闆嗕腑缂栫爜
    public String orderDetailId;    //璁㈠崟鏄庣粏缂栫爜
    public String orderDeptName;
    public double goodUnitprice;
    public String deliverGoodsDate;
    public String deliverGoodsTime;
    public String providerName;
    public String isTradeFlatManuf;
    public String providerId;
    public String isTradeFlatProvider;
    public double manufUnitprice;
    public String qualityAssurePeriod;
    public String drawingPieceCode;
    
    public double signInCount;//宸茬鏀舵暟閲�
    
    public String warehouseName;//浠撳簱鍚嶇О
    public String CONTACT_PERSON;
    public String CONTACT_tel;
    
    public Object process(ResultSet aResultSet) throws SQLException {
        GSOrderDetailOfBusForSWVO tGSOrderVO = new GSOrderDetailOfBusForSWVO();
        tGSOrderVO.orderDetailId = aResultSet.getString("P1").trim();
        tGSOrderVO.conCentricityId = aResultSet.getString("P2");
        tGSOrderVO.manufactureName = aResultSet.getString("P3").trim();
        tGSOrderVO.manufSpec = aResultSet.getString("P4") == null? "":aResultSet.getString("P4").trim();
        tGSOrderVO.manufType = aResultSet.getString("P5") == null? "":aResultSet.getString("P5").trim();
        tGSOrderVO.manufBrand = aResultSet.getString("P6") == null? "":aResultSet.getString("P6").trim();
        tGSOrderVO.providerName = aResultSet.getString("P7");
        tGSOrderVO.orderCount = aResultSet.getDouble("P8");
        tGSOrderVO.quantUnit = aResultSet.getString("P9")== null?"":aResultSet.getString("P9");
        tGSOrderVO.goodUnitprice = aResultSet.getDouble("P10");
        tGSOrderVO.deliverGoodsDate = aResultSet.getString("P11");
        tGSOrderVO.deliverGoodsTime = aResultSet.getString("P12");
        tGSOrderVO.orderDetailStatus = aResultSet.getString("P13").trim();
        tGSOrderVO.orderid = aResultSet.getString("P14");
        tGSOrderVO.isTradeFlatManuf = aResultSet.getString("P15");
        tGSOrderVO.providerId = aResultSet.getString("P16");
        tGSOrderVO.isTradeFlatProvider = aResultSet.getString("P17");
        tGSOrderVO.manufUnitprice = aResultSet.getDouble("P18");
        tGSOrderVO.qualityAssurePeriod = aResultSet.getString("P19");
        tGSOrderVO.drawingPieceCode = aResultSet.getString("P20");
        tGSOrderVO.deliverGoodsAddr = aResultSet.getString("P21");
        tGSOrderVO.signInCount = aResultSet.getDouble("P22");
        Map m=getKeyMap(aResultSet);
        tGSOrderVO.warehouseName = m.containsKey("P23")== false?"":aResultSet.getString("P23");
        tGSOrderVO.CONTACT_PERSON =m.containsKey("P24")== false?"":aResultSet.getString("P24");
        tGSOrderVO.CONTACT_tel= m.containsKey("P25")== false?"":aResultSet.getString("P25");
        return tGSOrderVO;

    }
    private Map getKeyMap(ResultSet aResultSet)throws SQLException{
    	Map m=new HashMap();
    	int columns = aResultSet.getMetaData().getColumnCount();
    	for (int i = 1; i <= columns; i++) {
			String columnName=aResultSet.getMetaData().getColumnName(i);
			m.put(columnName, "");
    	}
    	return m;
    }
	public double getSignInCount() {
		return signInCount;
	}

	public void setSignInCount(double signInCount) {
		this.signInCount = signInCount;
	}

	/**
     * @return the drawingPieceCode
     */
    public String getDrawingPieceCode() {
        return this.drawingPieceCode;
    }

    /**
     * @param aDrawingPieceCode the drawingPieceCode to set
     */
    public void setDrawingPieceCode(String aDrawingPieceCode) {
        this.drawingPieceCode = aDrawingPieceCode;
    }

}
